package com.duotai.duotai4;

public class Student extends People{
    private String major;

    public Student() {
    }

    public Student(String major) {
        this.major = major;
    }

    public Student(int id, String name, String major) {
        super(id, name);
        this.major = major;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    @Override
    public String toString() {
        return "People{" +
                "id=" + getId() +
                ", name='" + getName() + '\'' +
                ", major='" + major + '\'' +
                '}';
    }
}
